using System;
using System.Collections.Generic;
using System.Text;

namespace Colman.Rpg
{
    /// <summary>
    /// Represents a armor a player can wear.
    /// </summary>
    [Serializable]
    public class Armor : Item
    {
        /// <summary>
        /// Creates a new instance of <see cref="Armor" />.
        /// </summary>
        /// <param name="defensePoints">Represents the defense points the armor has.</param>
        /// <param name="name">Represents the armor's name or type.</param>
        /// <param name="cost">The cost per piece of this armor.</param>
        [System.Diagnostics.DebuggerStepThrough]
        public Armor(int defensePoints, string name, int cost)
            : this(defensePoints, name, 1, cost)
        {
        }

        /// <summary>
        /// Creates a new instance of <see cref="Armor" />.
        /// </summary>
        /// <param name="defensePoints">Represents the defense points the armor has.</param>
        /// <param name="name">Represents the armor's name or type.</param>
        /// <param name="amount">The amount of that same armor.</param>
        /// <param name="cost">The cost per piece of this armor.</param>
        [System.Diagnostics.DebuggerStepThrough]
        public Armor(int defensePoints, string name, int amount, int cost)
            : base(defensePoints, 0, name, amount, cost)
        {
        }

        /// <summary>
        /// Gets the same armor as the current object is, only with the <see cref="Item.Amount"/> property set to 1.
        /// </summary>
        /// <returns>The same armor as the current object is, only with the <see cref="Item.Amount"/> property set to 1.</returns>
        public override Item GetOne()
        {
            return new Armor(this.DefensePoints, this.Name, this.Cost);
        }
    }
}
